package com.example.anliku.service.serviceImpl;

import com.example.anliku.entity.Message;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import com.example.anliku.entity.System;
import com.example.anliku.mapper.SystemMapper;
import com.example.anliku.service.SystemService;

@Service
public class SystemServiceImpl implements SystemService {

    @Resource
    private SystemMapper systemMapper;

    @Override
    public Message deleteByPrimaryKey(Integer systemId) {
        return systemMapper.deleteByPrimaryKey(systemId)>0?Message.success(null):Message.fail(null);
    }

    @Override
    public Message insert(System record) {
        return systemMapper.insert(record)>0?Message.success(null):Message.fail(null);
    }

    @Override
    public Message insertSelective(System record) {
        return systemMapper.insertSelective(record)>0?Message.success(null):Message.fail(null);
    }

    @Override
    public Message selectByPrimaryKey(Integer systemId) {
        return Message.success(null).add(systemMapper.selectByPrimaryKey(systemId));
    }

    @Override
    public Message updateByPrimaryKeySelective(System record) {
        return systemMapper.updateByPrimaryKeySelective(record)>0?Message.success(null):Message.fail(null);
    }

    @Override
    public Message updateByPrimaryKey(System record) {
        return systemMapper.updateByPrimaryKey(record)>0?Message.success(null):Message.fail(null);
    }

    @Override
    public Message selectAll() {
        return Message.success(null).add(systemMapper.selectAll());
    }

}


